package com.gopay.common.dao.ptbank.impl;

import com.gopay.common.base.dao.impl.BaseDAOImpl;
import com.gopay.common.dao.ptbank.GsrtBankCustSuperviseInfoDao;
import com.gopay.common.domain.ptbank.GsrtBankCustSuperviseInfo;
import org.springframework.stereotype.Repository;

import java.io.Serializable;
import java.util.List;

/**
 *
 * GsrtBankCustSuperviseInfoDaoImpl.java 2016年4月25日
 * 
 * @author jlj www.gopay.com.cn Inc.All rights reserved.
 */
@Repository("gsrtBankCustSuperviseInfoDao")
public class GsrtBankCustSuperviseInfoDaoImpl extends BaseDAOImpl<GsrtBankCustSuperviseInfo, Serializable>
		implements GsrtBankCustSuperviseInfoDao {

	@SuppressWarnings("unchecked")
	@Override
	public GsrtBankCustSuperviseInfo getInfoByMerCustId(String merCustId) {
		String hql = "from GsrtBankCustSuperviseInfo where custBankState='01' and merCustId='" + merCustId + "' ";
		List<GsrtBankCustSuperviseInfo> list = hibernateTemplate.find(hql);

		return list.size() != 0 ? list.get(0) : null;
	}
}
